package com.bitmain.mmst.domain;

public class Miner {

	private String mac;
	private String ip;
	private String type;
	private String model;
	private double hashReal;
	private double hashAvg;
	private int frequency;
	private int chainNum;
	private Integer[] chainAcns;
	private Integer[] chipAlives;
	private Integer[] chipAlls;
	private String[] chains;
	
	public static Miner fromDetail(MinerDetectDetail detail) {
		Miner miner = new Miner();
		miner.setMac(detail.getMinerMac());
		miner.setIp(detail.getMinerHost());
		miner.setType(detail.getType());
		miner.setModel(detail.getMinerType());
		miner.setHashReal(detail.getHashReal());
		miner.setHashAvg(detail.getHashAvg());
		miner.setFrequency(detail.getFrequency());
		miner.setChainNum(detail.getChainNum());
		miner.setChainAcns(detail.getChainAcns());
		miner.setChipAlives(detail.getChipAlives());
		miner.setChipAlls(detail.getChipAlls());
		miner.setChains(detail.getChainAcss());
		return miner;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public double getHashReal() {
		return hashReal;
	}

	public void setHashReal(double hashReal) {
		this.hashReal = hashReal;
	}

	public double getHashAvg() {
		return hashAvg;
	}

	public void setHashAvg(double hashAvg) {
		this.hashAvg = hashAvg;
	}

	public int getFrequency() {
		return frequency;
	}

	public void setFrequency(int frequency) {
		this.frequency = frequency;
	}

	public int getChainNum() {
		return chainNum;
	}

	public void setChainNum(int chainNum) {
		this.chainNum = chainNum;
	}

	public Integer[] getChainAcns() {
		return chainAcns;
	}

	public void setChainAcns(Integer[] chainAcns) {
		this.chainAcns = chainAcns;
	}

	public Integer[] getChipAlives() {
		return chipAlives;
	}

	public void setChipAlives(Integer[] chipAlives) {
		this.chipAlives = chipAlives;
	}

	public Integer[] getChipAlls() {
		return chipAlls;
	}

	public void setChipAlls(Integer[] chipAlls) {
		this.chipAlls = chipAlls;
	}

	public String[] getChains() {
		return chains;
	}

	public void setChains(String[] chains) {
		this.chains = chains;
	}


}
